package com.example.concurrent;

public class ThreadGroupDemo {
    public static void main(String[] args) {
        ThreadGroup threadGroup1 = new ThreadGroup("group1");


        // 这个线程是threadGroup1的一员
        Thread thread1 = new Thread(threadGroup1, () -> {
            // 抛出unchecked异常
            throw new RuntimeException("测试异常");
        });

        thread1.start();
    }
}